<? 
	ob_start(); 
	require("connect.php");
	$ma=$_REQUEST["mahs"];
	$hotendem=$_REQUEST["hotendem"];
	$ten=$_REQUEST["ten"];
	$anh=$_REQUEST["anh"];
	$gioitinh=$_REQUEST["gioitinh"];
	$ngaysinh=$_REQUEST["demol1"];
	$diachi=$_REQUEST["diachi"];	
	$sqldate = strtotime($ngaysinh);
	$date = date('Y-m-d', $sqldate);		
	$sql="update hocsinh set hotendem='{$hotendem}', ten='{$ten}', anh='{$anh}', gioitinh='{$gioitinh}', ngaysinh='{$date}', diachi='{$diachi}' where mahs='{$ma}'";	
	mysql_query($sql) or die("Error!");		
	mysql_close();
	header("Location:hocsinh_admin_detail.php?mahs={$ma}");	
?>